package DBLag;
import ModelLag.Customer;
import java.sql.*;
import java.util.ArrayList;

/**
 *
 * @author Ronni
 */
public interface IFDbCustomer {
    /**Finds a customer in the database from a given cprNo
     * @param cprNo 
     * @return Customer
     */
    public Customer findCustomer(String phoneNo);
    /**Searches for a customer in the database, with the string "searchString"
     * @param searchString 
     * @return Customer
     */    
    public ArrayList<Customer> searchCustomer(String searchString);
    /**Retrieves all the Customers in the database
     * @param cprNo 
     * @return Customer
     */    
    public ArrayList<Customer> getAllCustomers();
    /**inserts the Customer in the database
     * @param customer 
     * @return returnCode
     */        
    public int insertCustomer(Customer customer) throws SQLException;
    /**updates the Customer in the database
     * @param customer 
     * @return returnCode
     */            
    public int updateCustomer(Customer customer) throws SQLException;
    /**deletes the Customer from the database
     * @param customer 
     * @return returnCode
     */            
    public int deleteCustomer(Customer customer) throws SQLException;
     /**builds a Customer object from the Resultset retrieved from a query
     * @param results
     * @return Customer object
     */            
}